#!/bin/bash

echo -n "enter a key:"
read key

while [ "$key" != "x" -a $key != "X" ] 
do
	case "$key" in
		[[:lower:]] ) echo "low case letter";;
		[[:upper:]] ) echo "upper case letter";;
		[0-9] ) echo "digit";;
		* ) echo "other";;
	esac

	echo -n "enter a key:"
	read key
done

